package com.crm.common.crm.constant;

import com.crm.common.utils.StringUtils;

public class CrmBusinessEnum {

    public enum ExtendTypeEnum {

        /**
         * 继承类型
         */
        O1(0,"原有字段"),
        O2( 1,"新建字段");

        ExtendTypeEnum(Integer type, String remarks){
            this.type = type;
            this.remarks = remarks;
        }

        private final Integer type;
        private final String remarks;


        public Integer getType(){
            return type;
        }

        public String getRemarks(){
            return remarks;
        }
    }

    public enum PublicEnum {

        ZERO(0,"0"),
        ONE( 1,"1"),
        TWO( 2,"2");

        PublicEnum(Integer type, String remarks){
            this.type = type;
            this.remarks = remarks;
        }

        private final Integer type;
        private final String remarks;


        public Integer getType(){
            return type;
        }

        public String getRemarks(){
            return remarks;
        }
    }


    public enum SignStatusEnum {

        NO_SIGN(0,"未签署"),
        SIGN_SUCCESS( 1,"已签署");

        SignStatusEnum(Integer type, String remarks){
            this.type = type;
            this.remarks = remarks;
        }

        private final Integer type;
        private final String remarks;


        public Integer getType(){
            return type;
        }

        public String getRemarks(){
            return remarks;
        }
    }


    public enum CustomerType {

        customer("学员","学员"),
        vip_customer( "vip学员","vip学员");

        CustomerType(String type, String remarks){
            this.type = type;
            this.remarks = remarks;
        }

        private final String type;
        private final String remarks;


        public String getType(){
            return type;
        }

        public String getRemarks(){
            return remarks;
        }
    }


    public enum SignTypeEnum{
        TYPE7("手写签名+短信签约",7),
        TYPE6( "手写识别签名+短信签约",6),
        TYPE8( "手写签名+人脸识别签约",8),
        TYPE9( "手写识别签名+人脸识别签约",9);

        SignTypeEnum( String remarks,Integer type){
            this.type = type;
            this.remarks = remarks;
        }


        private final String remarks;
        private final Integer type;


        public Integer getType(){
            return type;
        }

        public String getRemarks(){
            return remarks;
        }

        public static Integer getTypeByRemark(String remarks){
            if(StringUtils.isEmpty(remarks)){
                return null;
            }
            for(SignTypeEnum typeEnum : SignTypeEnum.values()){
                if(typeEnum.remarks.equals(remarks)){
                    return typeEnum.type;
                }
            }
            return null;
        }
    }

}
